package gen1us.jutw.utils;

/*
Copyright 2009 Evgeny Yusov

This file is part of JUTW.

JUTW is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

JUTW is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUTW.  If not, see http://www.gnu.org/licenses/.
*/

import gen1us.jutw.CreateConfig.ConfigFrame;
import umputun.jutw.Main;
import java.io.File;

public class CheckConfig {
	public static void findConfig(){
		File f = new File(CONFIG_NAME);
		if (!f.exists())
			ConfigFrame.createConfig();
		else
			start();
    }
    
    public static void start(){
    	String[] argv = {"--opts="+CONFIG_NAME};
    	Main.main(argv);
    }
    
    private static String CONFIG_NAME = "info.user";
}
